package com.lvmama.client;

import com.lvmama.base.ResultBase;
import com.lvmama.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("rhino-web-service")
public interface UserClient {

    @RequestMapping(method = RequestMethod.GET, value = "/user/findByUsername", consumes = "application/json")
    ResultBase<User> findByUsername(@RequestParam(value = "username") String username);

    @RequestMapping(method = RequestMethod.GET, value = "/user/findAll", consumes = "application/json")
    List<User> findAll();


}
